<template>
  <view class="box">
    <image class="img" mode="scaleToFill" src="@/static/images/wancheng.png"></image>
    <view class="msg">支付成功</view>
    <view class="btn" @click="comfirm">确认 </view>
  </view>
</template>

<script setup>
const type = ref(null);
const deviceNo = ref(null);
onLoad((options) => {
  if (options.type) {
    type.value = options.type;
  }
  if (options.deviceNo) {
    deviceNo.value = options.deviceNo;
  }
});
const isClick = ref(false)
function comfirm() {
  if (isClick.value) {
    return
  }
  isClick.value = true
  uni.redirectTo({
    url: `/pagesCommon/package/list?deviceNo=${deviceNo.value}`,
  });
  console.log('模拟跳转');
  setTimeout(() => {
    isClick.value = false
    console.log('2s后触发');
  }, 2000)
}
</script>

<style lang="scss" scoped>
.box {
  text-align: center;
  padding-top: 176rpx;
}

.img {
  width: 220rpx;
  height: 220rpx;
}

.msg {
  font-size: 44rpx;
  color: #151515;
  line-height: 60rpx;
  text-align: center;
  margin: 36rpx auto 140rpx;
}

.btn {
  width: 630rpx;
  //   margin: 0 auto;
  background: #27ab9c;
  height: 88rpx;
  margin: 48rpx auto;
  font-weight: 600;
  font-size: 36rpx;
  color: #ffffff;
  line-height: 88rpx;
  text-align: center;
  border-radius: 44rpx;
}
</style>
